package router

import (
	"getaway/handler/api"
	"github.com/gin-gonic/gin"
)

func Dispatch(v1 *gin.RouterGroup) {
	v1.POST("/dispatch/create", api.DispatchConfigCreateOrUpdate) // 创建或更新派单配置
	v1.GET("/get/dispatch", api.DispatchConfigGet)                // 获取派单配置
	v1.POST("/dispatch/del", api.DispatchConfigDelete)            // 删除派单配置
	v1.POST("/dispatch/gray/publish", api.DispatchGrayPublish)    // 发布派单灰度配置
	v1.POST("/dispatch/gray/rollback", api.DispatchGrayRollback)  // 回滚派单灰度配置
	v1.GET("/dispatch/audit", api.DispatchAuditQuery)             // 查询派单审计记录
	v1.GET("/ws/driver/id", api.WSDriver)
	v1.GET("/orders", api.WSOrder) //订单 WebSocket 实时通道
}
